package org.micropayment.consumer.oauth.service;

import javax.servlet.http.HttpServletRequest;
import org.springframework.security.Authentication;
import org.springframework.security.oauth.consumer.token.OAuthConsumerTokenServices;
import org.springframework.security.oauth.consumer.token.OAuthConsumerTokenServicesFactory;

/**
 *
 * @author jj
 */
public class MicropaymentConsumerTokenServicesFactory implements OAuthConsumerTokenServicesFactory {

  public OAuthConsumerTokenServices getTokenServices(Authentication authentication, HttpServletRequest request) {
    return new MicropaymentConsumerTokenServices(request.getSession(true));
  }

}
